package com.atguigu.Controller;

import com.atguigu.pojo.User;
import com.atguigu.service.UserService;
import com.atguigu.service.UserserviceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {

    @Autowired
    private UserserviceImpl userservice;

    @GetMapping ("/rfindAll")
    public List<User> findAll(){
        return userservice.rfindAll();
    }

    @GetMapping ("/rfindAll2")
    public List<User> findAll2(){
        return userservice.rfindAll2();
    }
}
